<template>
  <div>
    <p>{{ count }}</p>
    <p>
      <button @click="count++">count++</button>
    </p>
    <p>countSquare is {{ addCount }}</p>
    <p><input type="text" v-model="changeinf" /> &nbsp;&nbsp; {{ inf }}</p>
  </div>
</template>

<script setup>
import { ref, computed } from 'vue'
const count = ref(1)
const addCount = computed(() => count.value * count.value)
const inf = ref('lihua')
const changeinf = computed({
  get () {
    return inf.value
  },
  set (val) {
    return (inf.value = val)
  }
})
</script>

<style scoped></style>
